﻿
namespace Cos.Module.CMS.NHibernate.Test
{
    using System;
    using System.Collections.Generic;

    using Cos.Core.NHibernate;
    using Cos.Core.NHibernate.Tests;

    using NUnit.Framework;

    [TestFixture]
    public class PageDataModelFixture : ModuleFixtureBase
    {
         [Test]
        public void CanMapPageDataModel()
         {
             new PersistenceSpecification<PageDataModel>(Session)
                 .CheckProperty(x => x.PageName, "Intro Page")
                 .CheckProperty(x => x.PageNamePreview, "Description")
                 .CheckProperty(x => x.NavId, this.Nav.Id)
                 .CheckProperty(x => x.CultureCode, this.Culture.Id)
                 .CheckProperty(x => x.PageStatus, "Visible")
                 .CheckProperty(x => x.PageNavEnd, false)
                 .CheckProperty(x => x.CreationDate, new DateTime(2000, 01, 01))
                 .CheckProperty(x => x.LastModified, new DateTime(2001, 02, 03))
                 .CheckProperty(x => x.Author, "Steve Auz")
                 .CheckProperty(x => x.PageVisibility, true)
                 .CheckProperty(x => x.PageVisibilityPreview, false)
                 .CheckProperty(x => x.ApprobationDate, new DateTime(2011, 01, 01))
                 // .CheckComponentList(x => x.Elements, new List<ElementDataModel>())
                 .VerifyTheMappings();
         }
    }
}
